package com.atom.process.cnmuseum.bm.dao.task;

import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Repository;

import com.atom.common.dao.AvensCommonDao;
import com.atom.common.mb.entity.gl.MultimediaDO;
import com.atom.common.remote.user.UserUtil;
import com.atom.process.cnmuseum.bm.entity.task.BmMultimediaTaskDO;

@Repository
public class BmMultimediaTaskDao extends AvensCommonDao<BmMultimediaTaskDO>{

	public void createADO(UserUtil user, String processInstanceId, String taskId, MultimediaDO multimedia) {
		// TODO Auto-generated method stub
		BmMultimediaTaskDO ado = new BmMultimediaTaskDO();
        BeanUtils.copyProperties(multimedia, ado, "id");
        ado.setProcessId(processInstanceId);
        ado.setTaskId(taskId);
        save(ado);
	}

	public List<BmMultimediaTaskDO> findByTaskId(String taskId) {
		// TODO Auto-generated method stub
        List<BmMultimediaTaskDO> list = super.findByProperty("taskId", taskId);
        return list;
	}

}
